The present invention relates to a method of managing execution of a program in a distributed processing system having a plurality of processors and more particularly to a program execution management method capable of managing a start timing of a program in a processor in a system where the processor receives a message sent from another processor and then executes the program.
There is known a distributed processing system in which processors each having a processing unit are connected through a communication line. In the distributed processing system, instructions, execution results or the like are sent out from a processor to a network as a message. The message is received by another processor and a processing unit in the processor which has received the message performs some processing by using the message. In the distributed processing system, heretofore, when a message is transmitted from a processor on the transmission side to a processor on the reception side and is received by the processor on the reception side, the message is immediately delivered to a processing unit (strictly speaking, a program executed by the processing unit) on the reception side and processing is performed in accordance with the program. For example, JP-A-57-146361 discloses a so-called data driven type program execution, management method in which a program in a processor is started when data necessary to execute the program are taken into the processor from a common transmission path and are all present in a distributed processing system having a plurality of processors connected to the common transmission path.
In such a prior art, the execution timing of a program on the reception side is the time that the message is received and when a network in which an arrival time of the message cannot be forecasted is used, it is impossible to control the execution timing of the program.
On the other hand, there is a technique that when the message is received to the processor on the reception side, the processor stores the message in a buffer memory once and delivers the information to a program when a request is issued from the program in the processor on the reception side. In this system, the message is delivered when requested by the program, while there is no method of controlling the execution timing of the program using the message positively.
The above prior art has a problem that when the message is transmitted from the processor on the transmission side to the program in the processor on the reception side, the transmitted message is delivered to the program only when the message reaches the processor on the reception side or when the program on the reception side issues the reception request and accordingly it is impossible to deliver the message to the program on the reception side at an intended time of the program on the transmission side. Accordingly, when it is desirable to execute the program at the intended time, the program on the transmission side calculates a time required until the message reaches the program on the reception side and must transmit the message by the calculated time earlier than the time that the message is desired to be received. However, even in this method, the information does not necessarily reach the program on the reception side on the desired time exactly. Further, when a message is transmitted from one or a plurality of programs to a plurality of programs, the plurality of programs on the reception side cannot receive information at the same time and accordingly it is further impossible to successfully control delivery and receipt of a plurality of messages among a plurality of processors.
A method of starting a specified program at a specified time involves an xe2x80x9catxe2x80x9d command used in UNIX (OS licensed exclusively by X/OPEN company) which is one of an operating system (OS) of a computer. The xe2x80x9catxe2x80x9d command includes an argument to which a start time and a program name to be started are given and when the xe2x80x9catxe2x80x9d command is inputted, the specified program is started on the start time specified in the argument. However, the xe2x80x9cadxe2x80x9d command is the starting method of a program in a single processing unit and is different from that for specifying the start time of the program used in the message transmitted and received between the distributed processing units. Accordingly, the command is different from that relative to starting of the program on the reception side in the distributed processing unit.
It is an object of the present invention to provide an execution management method of a program on the reception side of a message in a distributed processing system in which the message sent from a program on the transmission side is used to enable the program on the reception side to perform processing at a specified time among a plurality of programs distributed in a plurality of processing units.
It is another object of the present invention to provide an execution management method in which information for specifying a kind of a program is given to a message in the program on the transmission side so that the program on the reception side can recognize the kind of the program and be executed at a previously specified timing.
It is a further object of the present invention to provide an execution management method in which information for specifying contents of a message is given to the message in the program on the transmission side so that the program on the reception side can recognize the contents of the message and be executed at a previously specified timing.
It is a still further object of the present invention to provide an execution management method in which information indicating an execution timing of a program in the program on the reception side is caused to be contained in a message sent from the program on the transmission side to thereby be able to control execution of the program on the reception side.
In order to achieve the above objects, in the present invention, a distributed processing system in which a program on reception side performs processing using a message transmitted from a program on transmission side among a plurality of programs distributed in a plurality of processing units connected through a network is configured as follows.
A management table for managing start of the program on reception side is provided in a processing unit in which the program on reception side is provided. The management table stores information indicating which program is started at which timing. When a message is broadcasted from the program on transmission side to the network, the processing unit on reception side judges from identification information included in the message whether the message is necessary for processing of the program on reception side or not. When it is necessary, the processing unit on reception side receives the message and when it is not necessary, the processing unit on reception side abandons the message.
The processing unit on reception side recognizes a program utilizing the received message and starts the recognized program on reception side at a start timing indicated in the management table. As the start timing, three start timings can be used including a start time of the program on reception side, a timing after an elapse of a designated period of time from reception of the message, and a designated period or cycle after reception of the message.
The management table is provided in a memory unit in each processing unit (or processor) and can be set in a corresponding manner to individual programs or messages transmitted and received between programs. Contents in the management table may be previously set by the operator before transmission of the message or the message including information indicating the start timing of the program on reception side is transmitted and contents in the management table may be rewritten every transmission of the message.
The message broadcasted to the network can adopt various formats such as (1) including a name of a program on reception side and message data, (2) including a content code and message data and (3) after including information indicating the start timing of the program on reception side in addition to (1) and (2). The present invention can be applied to the message which is not broadcasted but is transmitted while designating a specified address.